﻿@using EasyUIMvc
@model List<MenuItem>
@{
    ViewBag.Title = "Menu";
}

<h2>Menu</h2>
@Html.EasyUI().Menu(settings =>
{
    settings.Id = "menu";
}).Bind(Model).GetHtml()
@*<div id="menu" class="easyui-menu" style="width:120px;">  
    <div>New</div>  
    <div>  
        <span>Open</span>  
        <div style="width:150px;">  
            <div data--options="iconCls:'icon-save'"><b>Word</b></div>  
            <div>Excel</div>  
            <div>PowerPoint</div>  
            <div>
                <span>test1</span>
                <div>
                    <div data-options="iconCls:'icon-save',href:'/Sample/Index'">test2</div>
                    <div>test3</div>
                </div>
            </div>
        </div>  
    </div>  
    <div data-options="iconCls:'icon-save'">Save</div>  
    <div class="menu-sep"></div>  
    <div>Exit</div>  
</div>*@
<button onclick="showmenu()">Hiển thị trình đơn</button>
<script>
    function showmenu() {
        $('#menu').menu('show', {
            left: 200,
            top: 100
        });
    }
    $(document).ready(function () {
        $('#menu').menu('show', {
            left: 200,
            top: 100
        });
    });
</script>